package com.tengju.activity.application.shared;

public enum ApplicationExceptionCode {

    SMS_CODE_SEND_LIMITED("频繁获取短信验证码，请在%s秒后再试"),
    SMS_CODE_VALID_FAIL("短信验证码校验失败"),
    SMS_CODE_SEND_FAIL("短信验证码发送失败"),
    GEETEST_CHECK_FAIL("极验校验失败"),
    LOGIN_FAIL("登陆失败"),
    TOKEN_OVERDUE("token过期"),
    TOKEN_CHECK_FAIL("token校验失败,username:%s,token:%s"),
    DECRYPT_TOKEN_FAIL("解密token失败，token:%s"),
    CREATE_TOKEN_FAIL("生成token失败，username:%s"),
    USER_TOKEN_MISMATCH("userId与token不匹配，logoutInfo:%s"),
    USER_NOT_REGISTER("用户名未注册"),
    PWD_CHANGE_ERROR("密码变更失败，请重新获取短信验证码"),
    INVALID_DATA("数据异常 %s"),
    APP_VERSION_ERROR("APP版本号异常"),
    ZONE_NAME_EXIST("战区名已存在"),
    ZONE_EXIST_CLUB("战区仍存在俱乐部"),
    STAR_BLACKLIST_NOT_EXIST("星级黑名单不存在, idCode:%s"),
    STAR_BLACKLIST_EXIST("星级黑名单已存在, idCode:%s"),
    USERINFO_NOT_EXIST("用户信息不存在, idCode:%s"),
    SYSTEM_BUSY("系统繁忙，请稍后重试"),
    ;

    private String message;

    ApplicationExceptionCode(String message) {
        this.message = message;
    }

    public String getMessage(Object... param) {
        return String.format(message, param);
    }
}